package org.feifei.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.feifei.basic.domain.BaseDomain;
import org.feifei.org.domain.Shop;
import org.feifei.product.domain.Product;
import org.feifei.user.domain.User;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author forever
 * @Description:
 * @date 2021/12/19 22:38
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Getter
@Setter
@EqualsAndHashCode
public class ProductOrder extends BaseDomain {

    @ApiModelProperty("摘要")
    private String digest;
    @ApiModelProperty("状态 -1取消订单 - 0未支付 1已支付")
    private Integer state;
    @ApiModelProperty("价格")
    private BigDecimal price;
    @ApiModelProperty("订单编号")
    private String orderSn;
    @ApiModelProperty("支付编号")
    private String paySn;
    @ApiModelProperty("支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date lastPayTime;
    @ApiModelProperty("确认订单的时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date lastConfirmTime;

    // 那个订单
    @ApiModelProperty("注入服务商品")
    private Product product;
    @ApiModelProperty("服务商品id")
    private Long product_id;

    @ApiModelProperty("选择该商品的用户")
    private User user;
    @ApiModelProperty("用户的id")
    private Long user_id;
    //去哪个店铺领养
    @ApiModelProperty("该商品属于那个店铺，虽然没有")
    private Shop shop;
    private Long shop_id;

}
